3.44 \(\int \sin ^3(e+f x) (a+b \tan ^2(e+f x))^2 \, dx\)

Optimal. Leaf size=80 \[ \frac {(a-b)^2 \cos ^3(e+f x)}{3 f}-\frac {(a-3 b) (a-b) \cos (e+f x)}{f}+\frac {b (2 a-3 b) \sec (e+f x)}{f}+\frac {b^2 \sec ^3(e+f x)}{3 f} \]

[Out]

-(a-3*b)*(a-b)*cos(f*x+e)/f+1/3*(a-b)^2*cos(f*x+e)^3/f+(2*a-3*b)*b*sec(f*x+e)/f+1/3*b^2*sec(f*x+e)^3/f

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 80, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {3664, 448} \[ \frac {(a-b)^2 \cos ^3(e+f x)}{3 f}-\frac {(a-3 b) (a-b) \cos (e+f x)}{f}+\frac {b (2 a-3 b) \sec (e+f x)}{f}+\frac {b^2 \sec ^3(e+f x)}{3 f} \]

Antiderivative was successfully verified.

[In]

Int[Sin[e + f*x]^3*(a + b*Tan[e + f*x]^2)^2,x]

[Out]

-(((a - 3*b)*(a - b)*Cos[e + f*x])/f) + ((a - b)^2*Cos[e + f*x]^3)/(3*f) + ((2*a - 3*b)*b*Sec[e + f*x])/f + (b
^2*Sec[e + f*x]^3)/(3*f)

Rule 448

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Int[ExpandI
ntegrand[(e*x)^m*(a + b*x^n)^p*(c + d*x^n)^q, x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && NeQ[b*c - a*d, 0] &
& IGtQ[p, 0] && IGtQ[q, 0]

Rule 3664

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = Free
Factors[Sec[e + f*x], x]}, Dist[1/(f*ff^m), Subst[Int[((-1 + ff^2*x^2)^((m - 1)/2)*(a - b + b*ff^2*x^2)^p)/x^(
m + 1), x], x, Sec[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]

Rubi steps

\begin {align*} \int \sin ^3(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx &=\frac {\operatorname {Subst}\left (\int \frac {\left (-1+x^2\right ) \left (a-b+b x^2\right )^2}{x^4} \, dx,x,\sec (e+f x)\right )}{f}\\ &=\frac {\operatorname {Subst}\left (\int \left ((2 a-3 b) b-\frac {(a-b)^2}{x^4}+\frac {(a-3 b) (a-b)}{x^2}+b^2 x^2\right ) \, dx,x,\sec (e+f x)\right )}{f}\\ &=-\frac {(a-3 b) (a-b) \cos (e+f x)}{f}+\frac {(a-b)^2 \cos ^3(e+f x)}{3 f}+\frac {(2 a-3 b) b \sec (e+f x)}{f}+\frac {b^2 \sec ^3(e+f x)}{3 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.53, size = 72, normalized size = 0.90 \[ \frac {\left (-9 a^2+42 a b-33 b^2\right ) \cos (e+f x)+(a-b)^2 \cos (3 (e+f x))+4 b \sec (e+f x) \left (6 a+b \sec ^2(e+f x)-9 b\right )}{12 f} \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[e + f*x]^3*(a + b*Tan[e + f*x]^2)^2,x]

[Out]

((-9*a^2 + 42*a*b - 33*b^2)*Cos[e + f*x] + (a - b)^2*Cos[3*(e + f*x)] + 4*b*Sec[e + f*x]*(6*a - 9*b + b*Sec[e
+ f*x]^2))/(12*f)

________________________________________________________________________________________

fricas [A]  time = 0.48, size = 80, normalized size = 1.00 \[ \frac {{\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{6} - 3 \, {\left (a^{2} - 4 \, a b + 3 \, b^{2}\right )} \cos \left (f x + e\right )^{4} + 3 \, {\left (2 \, a b - 3 \, b^{2}\right )} \cos \left (f x + e\right )^{2} + b^{2}}{3 \, f \cos \left (f x + e\right )^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)^3*(a+b*tan(f*x+e)^2)^2,x, algorithm="fricas")

[Out]

1/3*((a^2 - 2*a*b + b^2)*cos(f*x + e)^6 - 3*(a^2 - 4*a*b + 3*b^2)*cos(f*x + e)^4 + 3*(2*a*b - 3*b^2)*cos(f*x +
 e)^2 + b^2)/(f*cos(f*x + e)^3)

________________________________________________________________________________________

giac [A]  time = 2.13, size = 144, normalized size = 1.80 \[ \frac {6 \, a b \cos \left (f x + e\right )^{2} - 9 \, b^{2} \cos \left (f x + e\right )^{2} + b^{2}}{3 \, f \cos \left (f x + e\right )^{3}} + \frac {a^{2} f^{11} \cos \left (f x + e\right )^{3} - 2 \, a b f^{11} \cos \left (f x + e\right )^{3} + b^{2} f^{11} \cos \left (f x + e\right )^{3} - 3 \, a^{2} f^{11} \cos \left (f x + e\right ) + 12 \, a b f^{11} \cos \left (f x + e\right ) - 9 \, b^{2} f^{11} \cos \left (f x + e\right )}{3 \, f^{12}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)^3*(a+b*tan(f*x+e)^2)^2,x, algorithm="giac")

[Out]

1/3*(6*a*b*cos(f*x + e)^2 - 9*b^2*cos(f*x + e)^2 + b^2)/(f*cos(f*x + e)^3) + 1/3*(a^2*f^11*cos(f*x + e)^3 - 2*
a*b*f^11*cos(f*x + e)^3 + b^2*f^11*cos(f*x + e)^3 - 3*a^2*f^11*cos(f*x + e) + 12*a*b*f^11*cos(f*x + e) - 9*b^2
*f^11*cos(f*x + e))/f^12

________________________________________________________________________________________

maple [B]  time = 0.87, size = 155, normalized size = 1.94 \[ \frac {-\frac {a^{2} \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3}+2 a b \left (\frac {\sin ^{6}\left (f x +e \right )}{\cos \left (f x +e \right )}+\left (\frac {8}{3}+\sin ^{4}\left (f x +e \right )+\frac {4 \left (\sin ^{2}\left (f x +e \right )\right )}{3}\right ) \cos \left (f x +e \right )\right )+b^{2} \left (\frac {\sin ^{8}\left (f x +e \right )}{3 \cos \left (f x +e \right )^{3}}-\frac {5 \left (\sin ^{8}\left (f x +e \right )\right )}{3 \cos \left (f x +e \right )}-\frac {5 \left (\frac {16}{5}+\sin ^{6}\left (f x +e \right )+\frac {6 \left (\sin ^{4}\left (f x +e \right )\right )}{5}+\frac {8 \left (\sin ^{2}\left (f x +e \right )\right )}{5}\right ) \cos \left (f x +e \right )}{3}\right )}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(f*x+e)^3*(a+b*tan(f*x+e)^2)^2,x)

[Out]

1/f*(-1/3*a^2*(2+sin(f*x+e)^2)*cos(f*x+e)+2*a*b*(sin(f*x+e)^6/cos(f*x+e)+(8/3+sin(f*x+e)^4+4/3*sin(f*x+e)^2)*c
os(f*x+e))+b^2*(1/3*sin(f*x+e)^8/cos(f*x+e)^3-5/3*sin(f*x+e)^8/cos(f*x+e)-5/3*(16/5+sin(f*x+e)^6+6/5*sin(f*x+e
)^4+8/5*sin(f*x+e)^2)*cos(f*x+e)))

________________________________________________________________________________________

maxima [A]  time = 0.53, size = 80, normalized size = 1.00 \[ \frac {{\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{3} - 3 \, {\left (a^{2} - 4 \, a b + 3 \, b^{2}\right )} \cos \left (f x + e\right ) + \frac {3 \, {\left (2 \, a b - 3 \, b^{2}\right )} \cos \left (f x + e\right )^{2} + b^{2}}{\cos \left (f x + e\right )^{3}}}{3 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)^3*(a+b*tan(f*x+e)^2)^2,x, algorithm="maxima")

[Out]

1/3*((a^2 - 2*a*b + b^2)*cos(f*x + e)^3 - 3*(a^2 - 4*a*b + 3*b^2)*cos(f*x + e) + (3*(2*a*b - 3*b^2)*cos(f*x +
e)^2 + b^2)/cos(f*x + e)^3)/f

________________________________________________________________________________________

mupad [B]  time = 15.40, size = 128, normalized size = 1.60 \[ -\frac {32\,a\,b+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6\,\left (64\,a\,b-32\,a^2\right )+12\,a^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\left (24\,a^2-96\,a\,b+96\,b^2\right )-4\,a^2-32\,b^2}{f\,\left (3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{12}-9\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8+9\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4-3\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(e + f*x)^3*(a + b*tan(e + f*x)^2)^2,x)

[Out]

-(32*a*b + tan(e/2 + (f*x)/2)^6*(64*a*b - 32*a^2) + 12*a^2*tan(e/2 + (f*x)/2)^8 + tan(e/2 + (f*x)/2)^4*(24*a^2
 - 96*a*b + 96*b^2) - 4*a^2 - 32*b^2)/(f*(9*tan(e/2 + (f*x)/2)^4 - 9*tan(e/2 + (f*x)/2)^8 + 3*tan(e/2 + (f*x)/
2)^12 - 3))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \tan ^{2}{\left (e + f x \right )}\right )^{2} \sin ^{3}{\left (e + f x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)**3*(a+b*tan(f*x+e)**2)**2,x)

[Out]

Integral((a + b*tan(e + f*x)**2)**2*sin(e + f*x)**3, x)

________________________________________________________________________________________